home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1432.dms / var1432.adf / NDUK-V40.lha / V40 / devtools / DOCS / lvo.doc < prev    next >
Text File  |  1994-02-14  |  5KB  |  139 lines

  1. lvo v37.3
  2. Copyright (c) 1990-1993 Commodore-Amiga, Inc.  All Rights Reserved
  3.  
  4. Usage: lvo library [funcname | LVO=0xhhhh,-0xhhhh,-n | ROMADDRESS=0xhhhhhhhh]
  5. Options: [CONTAINS] [WEDGELINE [wedgeopts]]
  6. OR: lvo library EQUATES >library_lib.i  to output _lib.i equates
  7. Needs FD: assign to where FD's are
  8.  
  9. LVO is a tool used in conjunction with FD files for system or
  10. other libraries.  It requires the FD files be in directory with the
  11. assignment "FD:".
  12.  
  13. LVO can be used in various ways as a programming/debugging tool:
  14.  
  15. ---------------------------------------------------------------------------
  16.  
  17. 1. To list the LVO offset and FD comment for any library function
  18.  
  19. Example: lvo exec InitResident
  20.     
  21. Outputs:
  22.  
  23. exec.library  LVO $ff9a -102  InitResident()
  24. InitResident(resident,segList)(a1,d1)
  25.  
  26. ---------------------------------------------------------------------------
  27.  
  28. 2. To list all of the LVO's for one library
  29.  
  30. Example: lvo intuition
  31.  
  32. Outputs:
  33. intuition.library  LVO $ffe2 -30  OpenIntuition()
  34. intuition.library  LVO $ffdc -36  Intuition()
  35. intuition.library  LVO $ffd6 -42  AddGadget()
  36. intuition.library  LVO $ffd0 -48  ClearDMRequest()
  37. intuition.library  LVO $ffca -54  ClearMenuStrip()
  38. intuition.library  LVO $ffc4 -60  ClearPointer()
  39. intuition.library  LVO $ffbe -66  CloseScreen()
  40. etc.
  41.  
  42.  
  43. LVO will list all of a library's LVOs if no function name is provided.
  44. With the optional CONTAINS keyword, LVO will also list the addresses
  45. each function jumps to on YOUR system (different on different systems).
  46. Note that if you have debugging tools installed which use SetFunction
  47. (for example, Mungwall, Devmon, or Scratch), LVO will not be able to
  48. determine the ROM address of the SetFunctioned library functions
  49. because the LVOs of those functions will point to the SetFunctioned
  50. RAM code.
  51.  
  52. If you use the EQUATES keyword, LVO will output the LVO's for a library
  53. in assembler EQU format:
  54.  
  55. _LVOOpenIntuition               EQU     -30
  56. _LVOIntuition                   EQU     -36
  57. _LVOAddGadget                   EQU     -42
  58. _LVOClearDMRequest              EQU     -48
  59. _LVOClearMenuStrip              EQU     -54
  60. _LVOClearPointer                EQU     -60
  61. _LVOCloseScreen                 EQU     -66
  62. etc.
  63.  
  64. ---------------------------------------------------------------------------
  65.  
  66. 3. To find a function name given a library name and an LVO value
  67.  
  68. Example: lvo exec LVO=-102
  69.  
  70. Outputs:
  71.  
  72. exec.library  LVO $ff9a -102  InitResident()
  73. InitResident(resident,segList)(a1,d1)
  74.  
  75. Acceptable formats for the LVO value are -decimal, negative hex word
  76. (example 0xFF9A or $FF9A), or negated positive hex word
  77. (examples -0x0066 or -0x66 or -$0066 or -$66).
  78.  
  79.  
  80.  
  81. ---------------------------------------------------------------------------
  82.  
  83. 4. To find a probable function from a library name and a ROM address
  84.  
  85. This is VERY useful used in conjunction with the OWNER tool and
  86. can help you determine the probable function of a ROM address
  87. where you might be having an Enforcer hit or a crash.
  88. Use the OWNER tool tp determine the ROM module (library) which contains
  89. the address, then use LVO to guess the probable function.
  90.    
  91. Example:
  92.  
  93. We want to find out about address 0xF80FA0 on my machine.
  94.  
  95. First we use the debugging tool OWNER to find the ROM library name:
  96.  
  97. OWNER 0xF80FA0
  98.  
  99. Outputs:
  100.  
  101. Address     - Owner
  102. --------   -----
  103. 00F80FA0 - in resident module: exec
  104.                                ^^^^
  105.  
  106. Now that we have the library name "exec", we use LVO with the same address:
  107.  
  108. LVO exec ROMADDRESS=0xF80FA0
  109.  
  110. Outputs:
  111.  
  112. exec.library LVO $ff9a -102 InitResident() jumps to $f80f9c on this system
  113.  
  114.  
  115. Note - some networking software packages may have a tool called "OWNER" -
  116. don't confuse this with the debugging tool OWNER.  You may want to
  117. rename OWNER to MEMOWNER or something similar.
  118.  
  119.  
  120. ---------------------------------------------------------------------------
  121.  
  122. 5. To generate a Wedge command line for wedging a library function
  123.  
  124.     Example: lvo exec InitResident WEDGELINE
  125.  
  126.     Outputs: (FD comment abbreviated here to fit in 80 columns)
  127.  
  128. run wedge exec 0xff9a 0x8202 0x8200 opt r  "c=InitResident(res,seg)(a1,d1)"
  129.  
  130. Note that LVO and Wedge can only interact with actual library functions,
  131. not for their various stub interfaces which only exist in linker libraries.
  132. Actual library functions are the functions listed in the FD file for the
  133. libraries.  Note also that under new versions of the OS, some older library
  134. functions become unused by the OS and newer functions are used
  135. in their place.  For example, wedging intuition OpenWindow will not
  136. catch Workbench or DOS opening windows under 2.0 and higher because
  137. they are using the new OpenWindowTagList().
  138.  
  139.